package Offer;

/**
 * 打印从1到最大的n位数
 * @author 是阿秋啊
 * @date 2022/08/19 21:38
 **/
public class Num17 {
    public int[] printNumbers(int n) {
        int len = 0;
        for(int i = 1; i <= n; i++) {
            len = len * 10 + 9;
        }
        int[] ret = new int[len];
        for(int i = 0; i < len; i++){
            ret[i] = i + 1;
        }
        return ret;
    }
}
